package com.xigua.chapter_6_prototype.framework;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/4/816:05
 */
public class UnderlinePen implements Product {
    private String ulcar;

    public UnderlinePen(String ulcar) {
        this.ulcar = ulcar;
    }


    public void use(String s) {
        System.out.println("\""+s+"\"");
        System.out.print(" ");
        for (int i = 0; i < s.length()+2; i++) {
            System.out.print(ulcar);
        }
        System.out.println(" ");
    }

    public Product createClone() {
        Product p = null;
        try {
            p = (Product) clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return p;
    }
}
